<?php 
class Silk_Pms_Block_Adminhtml_Renderer_Date extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract{
	public function render(Varien_Object $row)
	{
	    date_default_timezone_set('PRC'); 
	    $endat = $row->getToDate();
	    $endday = strtotime($endat);
	    $today = strtotime(date('Y-m-d H:i:s'));
	    $id =$row->getId();
	    $model = Mage::getModel("pms/gift")->load($id);
	    if($today>$endday){
	    	if($model->getStatus()){
	    		$model->setStatus(0);
	    		$model->save();
	    	}
	    	return  "是";
	    }else{
	    	return  "否";
	    }
	  

	}
}
?>